package businesslogic.userBl;

import dataservice.ResultMessage;
import businesslogicservice.userblservice.StudentBLService;
import businesslogicservice.userblservice.TeacherBLService;
import businesslogicservice.userblservice.UserBLService;


public class UserController implements UserBLService{

	UserBLService user;
	private String userID;
	
	public UserController(String userID){
		this.userID=userID;
		user=new User(userID);
	
	}

	@Override
	public ResultMessage login(String id, char[] password) {
		return user.login(id, password);
	}

	@Override
	public ResultMessage changePassword( char[] oldPassword,
			char[] password1, char[] password2) {
		return user.changePassword( oldPassword, password1, password2);
	}

	@Override
	public String getUserName(String userID)throws Exception {
		return user.getUserName(userID);
	}

	@Override
	public int getUserType(String userID) throws Exception {
		return user.getUserType(userID);
	}

}
